package com.eclink.asset.service;

import com.eclink.asset.mapper.NumberMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class NumberService {

    @Resource
    private NumberMapper numberMapper;

    /**
     * 获取最后一个的编码
     * @param tableName 表名
     * @param numberField 编码的列名
     * @param prevCode 前置编码
     * @return 结果
     */
    public String getLastNumber(String tableName, String numberField, String prevCode) {
        return numberMapper.selectLastNumber(tableName, numberField, prevCode);
    }

}
